Antalya 26.3: Iceberg client, handle namespaceExists error#1918
Antalya 26.3: Iceberg client, handle namespaceExists error#1918subkanthi wants to merge 7 commits into
Conversation
| auto timer = DB::CurrentThread::getProfileEvents().timer(ProfileEvents::DataLakeRestCatalogCreateNamespaceMicroseconds); | ||
| sendRequest(endpoint, request_body); | ||
| DB::ReadSettings read_settings = getContext()->getReadSettings(); | ||
| read_settings.http_max_tries = 1; |
There was a problem hiding this comment.
couldnt find a better way to stop retrying as the retries happen in sendRequest, adding to nonRetriable error codes will affect all http calls.
Audit: PR #1918 — Iceberg client: handle namespaceExists errorConfirmed DefectsMedium:
|
| Item | Status |
|---|---|
| Scope | RestCatalog::createNamespaceIfNotExists and sendRequest changes (2 files, 16 lines changed, caller: createTable) |
| HTTP 409 catch ordering | Pass |
sendRequest API compat (existing callers use default std::nullopt) |
Pass |
ReadSettings thread safety (local copy, not shared) |
Pass |
| C++ memory / race / UB / RAII | Pass — no issues |
| Exception ordering (specific before general) | Pass |
| Rollback safety (no state mutation) | Pass |
| Transient-network retry regression | Fail |
ProfileEvents accuracy |
Fail |
| Assumptions / limits | Static analysis only; isRetriableError global impact not tested; no review of catalog server's actual 409 body schema |
PR #1918 CI Triage ReportVerdictNo test regressions caused by this PR. All failing checks are either pre-existing flaky tests on Failing checks — categorized1. Pre-existing flaky tests (unrelated to PR)
2. Infrastructure / non-test checks (unrelated)
3. Cancelled — did not run~40 Recommendations
|
|
New audit report after latest changes: AI audit note: This review comment was generated by AI (claude-sonnet-4-6). Audit update for PR #1918 (Iceberg REST catalog: handle Internal Audit TraceScopeTwo files changed, 16 lines added / 4 deleted:
Call GraphTransition Matrix
Key isRetriableError analysis
Branch Coverage
Fault Injection Matrix
Concurrency Analysis
This is the scenario the fix was designed for. Correct. ✓ The change introduces no new shared mutable state. ReportConfirmed defects: Coverage summary: |
this was the easy fix, but Im not sure if this is correct, because adding 409 to the non_retriable_errors will affect all http calls(non-iceberg) the CH server will be making |
There was a problem hiding this comment.
Pull request overview
Adjusts the Iceberg REST catalog client to avoid exponential-backoff retries when the catalog responds with HTTP_CONFLICT during namespace creation, addressing CREATE TABLE ... ENGINE Iceberg slowness in the 26.3 stable line.
Changes:
- Extend
DataLake::RestCatalog::sendRequestto accept an optionalDB::ReadSettingsoverride. - In
createNamespaceIfNotExists, forcehttp_max_tries = 1for the namespace-creation request and explicitly treatHTTP_CONFLICTas “already exists”. - Add the necessary
ReadSettingsinclude for the new API surface.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/Databases/DataLake/RestCatalog.h |
Extends the protected sendRequest API to optionally accept per-call DB::ReadSettings. |
src/Databases/DataLake/RestCatalog.cpp |
Uses a one-try HTTP setting for namespace creation and handles HTTP_CONFLICT without triggering multi-try backoff delays. |
| DB::ReadSettings read_settings = getContext()->getReadSettings(); | ||
| read_settings.http_max_tries = 1; | ||
| sendRequest(endpoint, request_body, Poco::Net::HTTPRequest::HTTP_POST, false, read_settings); |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Documentation entry for user-facing changes
CI/CD Options
Exclude tests:
Regression jobs to run: